import { Provide } from '@midwayjs/decorator';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm'
import { ClassfootEntity } from '../entity/classtify';

/**
 * 描述
 */
@Provide()
export class adminService {
    @InjectEntityModel(ClassfootEntity)
    ClassModel: Repository<ClassfootEntity>;

    /**
     * 描述
     */
    async addclass(name: string) {

        let item = new ClassfootEntity()
        item.name = name
        await this.ClassModel.save(item)
        return {
            code: 20000,
            message: "成功"
        }
    }
}







